<?php

namespace app\modules\admin\models;

use Yii;

/**
 * This is the model class for table "dictionary_table_field".
 *
 * @property int $id 主键id
 * @property int $dictionary_id 字典归属
 * @property string $field_name 字段名称
 * @property string $field_value 字段值
 * @property string $data_type 数据类型
 * @property string $form_type 表单类型
 * @property string $validate_rule 字段验证规则
 * @property int $list_ignore 列表不显示
 * @property int $deleted 是否删除
 * @property string $created 创建时间
 * @property string $modified 修改时间
 */
class DictionaryTableField extends BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dictionary_table_field';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['dictionary_id', 'field_name', 'field_value'], 'required'],
            [['dictionary_id', 'list_ignore', 'deleted'], 'integer'],
            [['created', 'modified'], 'safe'],
            [['field_name', 'field_value', 'data_type', 'form_type'], 'string', 'max' => 50],
            [['validate_rule'], 'string', 'max' => 200],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', '主键id'),
            'dictionary_id' => Yii::t('app', '字典归属'),
            'field_name' => Yii::t('app', '字段名称'),
            'field_value' => Yii::t('app', '字段值'),
            'data_type' => Yii::t('app', '数据类型'),
            'form_type' => Yii::t('app', '表单类型'),
            'validate_rule' => Yii::t('app', '字段验证规则'),
            'list_ignore' => Yii::t('app', '列表不显示'),
            'deleted' => Yii::t('app', '是否删除'),
            'created' => Yii::t('app', '创建时间'),
            'modified' => Yii::t('app', '修改时间'),
        ];
    }
}
